package com.tj.seed.common.constant;

import lombok.AllArgsConstructor;
import lombok.Getter;
import org.springframework.http.HttpStatus;

/**
 * 常返回码
 */
@Getter
@AllArgsConstructor
public enum ResultCode {
    SUCCESS(HttpStatus.OK.value(),"操作成功"),
    FAILED(HttpStatus.INTERNAL_SERVER_ERROR.value(), "服务器错误"),
    AUTH_NO_VALID_TOKEN(HttpStatus.UNAUTHORIZED.value(),"请登录"),
    AUTH_USER_PERMISSION(501,"用户无权限"),
    AUTH_USER_FORBIDDEN(HttpStatus.FORBIDDEN.value(), "用户已禁用");
    private Integer code;
    private String errMsg;
}
